<%-- 
    Document   : deleteCircle
    Created on : Dec 6, 2011, 9:14:40 PM
    Author     : Michael
--%>

<%@page import="java.sql.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% if(session.getAttribute("LoggedIn")==null)
       {
    response.sendRedirect("index.html");
    return;
        }

%>
<%
    int circleID = Integer.parseInt(request.getParameter("CIRC"));
    
    Connection conn = null;
    try
    {
        conn = new DBClasses.GetConnection().getConnection();
        conn.createStatement().execute("DELETE FROM circle WHERE CircleID=" + circleID);
    }
    catch(Exception e) 
    { 
        e.printStackTrace(); response.sendRedirect("gohome.jsp"); 
    }
    
    finally
    {
        try { conn.commit(); conn.close(); response.sendRedirect("gohome.jsp"); }
        catch(Exception e) {  response.sendRedirect("gohome.jsp"); }
    }
%>
